<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/promiseAjax.js"></script>
    <script src="./js/cookie.js"></script>
    <link rel="stylesheet" href="./css/cart.css">
</head>

<body>
    <div class="cart">
        <ul class="cartList">

        </ul>
        
    
    <script>
        var page = 1
        var pageSize = 8
        var cartList = document.querySelector('.cartList')
        function getCart() {
            request({
                url: 'api/cart/getCartAllGoods/' + page + '/' + pageSize
            }).then(res => {
                console.log('111', res);
                var data = res.data.data
                console.log('111', data);
                // totalPage = res.data.totalPage
                var html=''
                data.forEach(cart=>{
                    html += `
                        <li>
                            <img src="${cart.imgBigLogo}" alt="">
                            <P>${cart.title}</p>
                            <span>${cart.price}</span>
                            <span>${cart.goodsnumber}</span>
                        </li>
                    `
                })
                cartList.innerHTML = html
            })
        }
        getCart()
    </script>
</body>

</html>